package com.aurora.blog.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.aurora.common.core.annotation.Excel;
import com.aurora.common.core.web.domain.BaseEntity;

/**
 * 文章对象 blog_posts
 * 
 * @author aurora
 * @date 2024-06-04
 */
public class BlogPosts extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 文章ID */
    private Long postId;

    /** 文章标题 */
    @Excel(name = "文章标题")
    private String title;

    /** 文章的URL别名，唯一标识 */
    @Excel(name = "文章的URL别名，唯一标识")
    private String slug;

    /** 文章内容 */
    @Excel(name = "文章内容")
    private String content;

    /** 发表该文章的用户ID，关联到Users表的user_id */
    @Excel(name = "发表该文章的用户ID，关联到Users表的user_id")
    private Long userId;

    /** 文章发表时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "文章发表时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date publishedAt;

    /** 文章最后更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "文章最后更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date updatedAt;

    /** 0、草稿状态。1、上线出版状态 */
    @Excel(name = "0、草稿状态。1、上线出版状态")
    private Long status;

    /** 文章被查看的次数 */
    @Excel(name = "文章被查看的次数")
    private Long viewCount;

    /** 文章被点赞的次数 */
    @Excel(name = "文章被点赞的次数")
    private Long likeCount;

    public void setPostId(Long postId) 
    {
        this.postId = postId;
    }

    public Long getPostId() 
    {
        return postId;
    }
    public void setTitle(String title) 
    {
        this.title = title;
    }

    public String getTitle() 
    {
        return title;
    }
    public void setSlug(String slug) 
    {
        this.slug = slug;
    }

    public String getSlug() 
    {
        return slug;
    }
    public void setContent(String content) 
    {
        this.content = content;
    }

    public String getContent() 
    {
        return content;
    }
    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }
    public void setPublishedAt(Date publishedAt) 
    {
        this.publishedAt = publishedAt;
    }

    public Date getPublishedAt() 
    {
        return publishedAt;
    }
    public void setUpdatedAt(Date updatedAt) 
    {
        this.updatedAt = updatedAt;
    }

    public Date getUpdatedAt() 
    {
        return updatedAt;
    }
    public void setStatus(Long status) 
    {
        this.status = status;
    }

    public Long getStatus() 
    {
        return status;
    }
    public void setViewCount(Long viewCount) 
    {
        this.viewCount = viewCount;
    }

    public Long getViewCount() 
    {
        return viewCount;
    }
    public void setLikeCount(Long likeCount) 
    {
        this.likeCount = likeCount;
    }

    public Long getLikeCount() 
    {
        return likeCount;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("postId", getPostId())
            .append("title", getTitle())
            .append("slug", getSlug())
            .append("content", getContent())
            .append("userId", getUserId())
            .append("publishedAt", getPublishedAt())
            .append("updatedAt", getUpdatedAt())
            .append("status", getStatus())
            .append("viewCount", getViewCount())
            .append("likeCount", getLikeCount())
            .toString();
    }
}
